﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Rotempco.BaseClass;
using Rotempco.BaseClass.Objects.AttributeStoreObjects;
using Rotempco.Core.Web.Logic;

namespace Rotempco.Website.WebPages.Admin.PasswordSettings
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                DataBindControls();
        }

        private void DataBindControls()
        {
            PasswordSetting passwordSettings =  Factory.PasswordSetting.GetPasswordSettings();
            WebFormFiller.FillForm<PasswordSetting>(passwordSettings, this);
        }


        protected bool button_Save()
        {
            PasswordSetting passwordSettings =  Factory.PasswordSetting.GetPasswordSettings();
            WebFormFiller.FillObject<PasswordSetting>(passwordSettings, this);
            Factory.PasswordSetting.SetPasswordSettings(passwordSettings);

            return false;
        }
    }
}